<?php

class row_Tarefa extends Zend_Db_Table_Row_Abstract
{

    protected $responsavel;
    protected $status;
    
    public function responsavel(){
        if (!null==$this->responsavel_id){
            $result = $this->findParentRow('Usuarios');
            if($result){
                return $result->nome;
            } else return null;
        } else {return "<span style='color:red;'>Não distribuído!</span>";}
    }
    
    function __get($key)
    {
        if(method_exists($this, $key)){
            return $this->$key();
        }
        return parent::__get($key);
    }
}
